﻿<link href="@Url.Content("~/content/table_btn.css")" rel="stylesheet" type="text/css"/>

@model PessMvc.Models.LogOnModel

@{
    ViewBag.Title = "Log On";
}

<h2>Sign In</h2>


@using (Html.BeginForm("LogOn","Account")) {
        <fieldset class="logon">
            <h4 style="float:none;text-align:left;width:100%">

            @if(ViewBag.ActivityStatus==0){
            <span>Don't have an account for the symposium?<br />
            Click @Html.ActionLink("here", "Register") to create an account.</span>
    <br />
    <br />
    <span>Already have an account for the symposium?<br/>
                Please sign in:</span>
            }
            else if (ViewBag.ActivityStatus == 2)
            {
                <br/><span>Submission and review finisned. Only Administrator, Chair, and Editor can log in.</span>
            }
            else
            {
                <span>System closed. Only Administrator can log in.</span>
            }
            

                </h4>
            <div class="editor-label">
                @*@Html.LabelFor(m => m.UserName)*@Email
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-check">
                @Html.CheckBoxFor(m => m.RememberMe)
                @Html.LabelFor(m => m.RememberMe)
            </div>

            

            <div class="editor-btn">
                <input type="submit" value="Login" />   @Html.ActionLink("Forget Password?", "ResetPassword")
            </div>
        </fieldset>
        @Html.ValidationSummary(true, "Login failed. Username or password is wrong, please try again.")
}

@*<h2 style="width:500px"><a href="/help/untitled.html">Reviewer's help（Windows XP）</a></h2>*@
    <div id="jswarning">
        <br /><br /><h1>JavaScript is disabled！Please enable JavaScript to continue.</h1>
    </div>
    <script type="text/javascript">
        $("#jswarning").hide();

        function getInternetExplorerVersion()
            // Returns the version of Internet Explorer or a -1
            // (indicating the use of another browser).
        {
            var rv = -1; // Return value assumes failure.
            if (navigator.appName == 'Microsoft Internet Explorer') {
                var ua = navigator.userAgent;
                var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
                if (re.exec(ua) != null)
                    rv = parseFloat(RegExp.$1);
            }
            return rv;
        }
        function checkVersion() {
            var msg = "You're not using Internet Explorer.";
            var ver = getInternetExplorerVersion();
            var expectedver = 10.0;

            if (ver > -1) {
                if (ver >= expectedver)
                    msg = "You're using a recent copy of Internet Explorer."
                else {
                    //alert("Your browser is not compatible，please use Internet Explorer 8.0 or higher version");
                    $('#downloadie').html("<p>You are not using a recent copy of Internet Explorer. <a href='http://windows.microsoft.com/en-us/internet-explorer/download-ie' target='blank'>Click here to check and install the latest version.</a></p>" +
                        "<p>If you are using Windows XP, please use Chrome. <a href='https://www.google.com/intl/en/chrome/browser/' target='blank'>Click here to download Chrome browser</a></p>");
                }
            }

        }
        checkVersion();

    </script>
